export interface ApiResponse<T = any> {
    status: number
    message: string
    data?: T
}

export function ok<T = any>(data?: T, message = 'success', status = 200): ApiResponse<T> {
    return { status, message, data }
}

export function fail<T = any>(message = 'error', status = 500, data?: T): ApiResponse<T> {
    return { status, message, data }
}


